package com.zeno.soil.rbac.repository.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 系统角色
 * @author zeno
 */
@Data
@NoArgsConstructor
@TableName(value = "`role`")
public class Role {

    /**
     * 自增主键，仅用于维持数据表操作性能
     */
    @TableId(value = "_id", type = IdType.NONE)
    private Long id;

    /**
     * 角色编码
     */
    @TableField(value = "code")
    private String code;

    /**
     * 角色名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 角色备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 是否固定角色不可删除;0=小固定,1=固定
     */
    @TableField(value = "fixed")
    private Integer fixed;

    /**
     * 创建人ID
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    private Date createAt;

    /**
     * 更新人ID
     */
    @TableField(value = "update_by")
    private Long updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_at")
    private Date updateAt;

    public static final String COL__ID = "_id";

    public static final String COL_CODE = "code";

    public static final String COL_NAME = "name";

    public static final String COL_REMARK = "remark";

    public static final String COL_FIXED = "fixed";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_AT = "create_at";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_AT = "update_at";
}